package com.aaa.dem1031.d01;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/10/31  15:25
 */
public class Test {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.setName("线程1");
        myThread.start();

        MyThread myThread1 = new MyThread();
        myThread1.setName("线程2");
        myThread1.start();

        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"执行"+i);
        }
    }
}
